package com.pan.download5.factory.impl;

import com.pan.crawler.Directory;
import com.pan.crawler.auto.AutoCrawlerDirectory;
import com.pan.download5.parse.AutoXmlParser;
import com.pan.download5.factory.DirectoryFactory;
import com.pan.download5.parse.entity.auto.impl.AutoDirectory;
import com.pan.download5.parse.entity.auto.impl.AutoTitle;

public class AutoCrawlerDirectoryFactory implements DirectoryFactory {


    private AutoDirectory directoryInfo;
    private  AutoTitle titleInfo;

    public AutoCrawlerDirectoryFactory(AutoDirectory directoryInfo, AutoTitle titleInfo){
        this.directoryInfo = directoryInfo;
        this.titleInfo = titleInfo;
    }

    @Override
    public Directory createDirectory() {
        AutoCrawlerDirectory autoCrawlerDirectory = new AutoCrawlerDirectory(titleInfo, directoryInfo);
        return autoCrawlerDirectory;
    }
}
